package com.tmc.dao.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.tmc.entity.baseinfo.CarType;

/**
 * @author zhang
 * @date 2018年1月15日 下午3:36:45 
 */
@Repository
public class EthCarTypeDaoImpl extends BaseDaoImpl<CarType> {

	/**
	 * @author zhang
	 * @return
	 */
	public List<CarType> findAll() {
		Map<String, Object> params = new HashMap<String, Object>();
		StringBuilder sql = new StringBuilder();
		sql.append(" from CarType c where c.enabledFlag = 'Y' ");
		return this.findList(sql.toString(), params);
	}

	/**
	 * @author zhang
	 * @param yitu8CarTypeID
	 * @return
	 */
	public CarType getByYitu8CarTypeID(java.lang.Integer yitu8CarTypeID) {
		Map<String, Object> params = new HashMap<String, Object>();
		StringBuilder sql = new StringBuilder();
		sql.append(" from CarType c where c.enabledFlag = 'Y' and c.yitu8CarTypeID =: yitu8CarTypeID ");
		params.put("yitu8CarTypeID", yitu8CarTypeID);
		return this.get(sql.toString(), params);
	}
	
}
